package edu.sandau.b230151.b23015101.mapper;

import edu.sandau.b230151.b23015101.model.Book;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BookMapper {
    List<Book> findALL(Book book);
//        return bookMapper.findALL();

    @Delete("delete from book where id=#{id}")
    void deleteById(String id);
    @Insert("insert into book(id,name,price) values(#{id},#{name},#{price})")
    void save(Book s);

    @Update("update book set name=#{name},price=#{price} where id=#{id}")
    void update(Book s);
    @Select("select * from book where id=#{id}")
    Book getReferenceById(String id);
}
